package com.wanmait.schedule.controller;


import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.wanmait.schedule.entity.CompanyType;
import com.wanmait.schedule.service.CompanyTypeService;
import com.wanmait.schedule.util.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 类型表 前端控制器
 * </p>
 *
 * @author wanmait
 * @since 2022-03-02
 */
@RestController
@RequestMapping("company-type")
public class CompanyTypeController {

    @Resource
    private CompanyTypeService companyTypeService;

    //查询公司类型
    @GetMapping("personal/acceptCompanyType")
    public Result acceptCompanyType(CompanyType companyType){
        List<CompanyType> companyTypes = companyTypeService.list();
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("companyTypes",companyTypes);
        return Result.success(jsonObject);
    }

}
